


pdf("sample_plot_methylation.pdf")
array<-c("BRCA BREAST","COAD COlON GI","GBM GLIOBLASTOMA","KIRC KIDNEY CLEAR CELL","KIRP KIDNEY PAPILLARY CELL","LAML HEMATOLOGY","LUAD LUNG ADENO CAR","LUSC LUNG SQUAMOUS CELL CAR","OV OVARY","READ RECTUM","STAD STOMACH","UCEC UTERUS")
num<-1
while(num<=length(array))
{
	print(num)
	min<-min(which(factor==num))
	max<-max(which(factor==num))
	main<-paste(array[num],"Median AVG Beta",sep=" ")
	dotchart(summary[min:max,3],labels=row.names(summary)[min:max],cex=.2,main=main,xlab="avg beta",xlim=c(0,1),pch=11,color=factor[min:max])
	num<-num+1
}
dev.off()